package QL;

import java.util.List;
import java.util.ArrayList;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class ButlerGameRoomPlatformSummary implements IQLResponse
{
    /// <summary>
    /// 服务器Id
    /// </summary>
    public long ServerId;

    /// <summary>
    /// 房间Id
    /// </summary>
    public long ConfigId;

    /// <summary>
    /// 台子数量
    /// </summary>
    public long PlatformCount;

    /// <summary>
    /// 玩家总消耗
    /// </summary>
    public long PlayersCost;

    /// <summary>
    /// 玩家总获得
    /// </summary>
    public long PlayersGain;

    /// <summary>
    /// 总税收
    /// </summary>
    public long FeeGrab;

    /// <summary>
    /// 总彩金抽成
    /// </summary>
    public long BonusGrab;

    /// <summary>
    /// 总彩金发放
    /// </summary>
    public long BonusDistribute;

    /// <summary>
    /// 总水位线
    /// </summary>
    public long WaterLine;

    /// <summary>
    /// 总抽水
    /// </summary>
    public long WaterLinePull;

    /// <summary>
    /// 总放水
    /// </summary>
    public long WaterLinePush;

    /// <summary>
    /// 总抽彩
    /// </summary>
    public long BonusPull;

    /// <summary>
    /// 总放彩
    /// </summary>
    public long BonusPush;

    @Override
    public void DeserializeFromJson(JSONObject jsonObj)
    {
        JSONObject t = jsonObj;
        if (t.has("server_id"))
            ServerId = t.getLong("server_id");
        if (t.has("config_id"))
            ConfigId = t.getLong("config_id");
        if (t.has("platform_count"))
            PlatformCount = t.getLong("platform_count");
        if (t.has("players_cost"))
            PlayersCost = t.getLong("players_cost");
        if (t.has("players_gain"))
            PlayersGain = t.getLong("players_gain");
        if (t.has("fee_grab"))
            FeeGrab = t.getLong("fee_grab");
        if (t.has("bonus_grab"))
            BonusGrab = t.getLong("bonus_grab");
        if (t.has("bonus_distribute"))
            BonusDistribute = t.getLong("bonus_distribute");
        if (t.has("water_line"))
            WaterLine = t.getLong("water_line");
        if (t.has("water_line_pull"))
            WaterLinePull = t.getLong("water_line_pull");
        if (t.has("water_line_push"))
            WaterLinePush = t.getLong("water_line_push");
        if (t.has("bonus_pull"))
            BonusPull = t.getLong("bonus_pull");
        if (t.has("bonus_push"))
            BonusPush = t.getLong("bonus_push");
    }
}
